
SET(CMAKE_VERBOSE_MAKEFILE ON)

SET(YDRA_CMAKE_HOME /usr/share/cmake/ydra)
SET(CMAKE_MODULE_PATH ${YDRA_CMAKE_HOME})



# project name
PROJECT( mpl-parser )

#Include the default qt uses for all ydra-mpl projects
INCLUDE ( ${PROJECT_SOURCE_DIR}/../cmake/ydra_mpl_base_qt_uses.cmake )
#Here you can change qt uses this must before include the ydra_required_qt4
INCLUDE ( ${YDRA_CMAKE_HOME}/ydra_required_qt4.cmake)

#This add the include dirs that this project use for it's own headers.
INCLUDE ( ${YDRA_CMAKE_HOME}/ydra_cpp_project_includes.cmake )

#This add the support for the ydra-mpl/parser-lib.
INCLUDE ( ${PROJECT_SOURCE_DIR}/../cmake/ydra_required_mpl_parser_lib.cmake )

#Get the cpp sources for the current project
AUX_SOURCE_DIRECTORY(src PROJECT_SOURCES)

FIND_PACKAGE(MplParser REQUIRED)
include_directories (${MPLPARSER_INCLUDES})
FIND_PACKAGE(antlr REQUIRED)
include_directories(${ANTLR_INCLUDES})

FIND_PACKAGE(Boost REQUIRED)
MESSAGE(STATUS "Boost includes: ${Boost_INCLUDE_DIR}")
include_directories(${Boost_INCLUDE_DIR})

#Add a target executable
ADD_EXECUTABLE(MplParser ${PROJECT_SOURCES})

TARGET_LINK_LIBRARIES(MplParser ${MPLPARSER_LIBRARIES})



#Create a rule for install the executable in bin directory.
INSTALL(TARGETS MplParser RUNTIME DESTINATION bin)
TARGET_LINK_LIBRARIES(MplParser boost_program_options-mt)